Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radiation plugin: Workaround BP5 bug #4399

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Dec 15, 2022

With the BP5 engine, the Radiation plugin currently creates unreadable files:

$ bpls radiationOpenPMD_/e_radAmplitudes.bp5
Failed to open with BPFile engine: [Thu Dec 15 10:31:43 2022] [ADIOS2 EXCEPTION] <Core> <IO> <DefineAttribute> : modifiable attribute /data/0/dt has been defined with type double. Type cannot be changed to float

Failed to open with HDF5 engine: [Thu Dec 15 10:31:43 2022] [ADIOS2 EXCEPTION] <Engine> <HDF5ReaderP> <HDF5ReaderP> : Invalid HDF5 file found


Error: Could not open this file with any ADIOS2 file reading engines

The Radiation plugin sets some attributes quite late. This is normally supported by the openPMD-api, but can become a bit tricky, when the attribute is a default attribute with a default value. The Radiation plugin uncovers a bug in (depending on your point of view) either openPMD-api or in ADIOS2 with this procedure in the BP5 engine. Realistically the best fix for this would be to set defaults in the openPMD-api as late as possible, and not as early as possible (see the corresponding item in openPMD/openPMD-api#1332). For now, defining these attributes as early as possible in the Radiation plugin is a sensible workaround.

TODO:

@franzpoeschel franzpoeschel force-pushed the fix-radiation-bp5 branch 2 times, most recently from 5878297 to 25eb278 Compare December 15, 2022 15:01
@psychocoderHPC psychocoderHPC added bug a bug in the project's code component: plugin in PIConGPU plugin labels Dec 16, 2022
@PrometheusPi
Copy link
Member

@franzpoeschel great catch

The Radiation plugin sets some attributes quite late. This is normally
supported by the openPMD-api, but can become a bit tricky, when the
attribute is a default attribute with a default value.
The Radiation plugin uncovers a bug in (depending on your point of view)
either openPMD-api or in ADIOS2 with this procedure in the BP5 engine.
Realistically the best fix for this would be to set defaults in the
openPMD-api as late as possible, and not as early as possible.
For now, defining these attributes as early as possible in the Radiation
plugin is a sensible workaround.
@PrometheusPi PrometheusPi merged commit 18bbd30 into ComputationalRadiationPhysics:dev Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the project's code component: plugin in PIConGPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants